package cloud.xlh.auth.controller;

import cloud.xlh.auth.service.TokenService;
import com.alibaba.fastjson.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created with IntelliJ IDEA.
 *
 * @ project name : xlh_osms
 * @ Author: XuLeHuang
 * @ Date: 2023/1/15 21:05
 * @ Description:
 */
@RestController
@RequestMapping("/auth/check")
public class CheckController {

    @Autowired
    private TokenService tokenService;

    @RequestMapping("/checkToken")
    public boolean checkToken(@RequestBody JSONObject jsonObject) {
        return tokenService.checkToken(jsonObject);
    }
}
